#!/usr/bin/python3

import os
import re
import subprocess
import sys

if __name__ == "__main__":
    WORK_DIR=subprocess.run(["pwd"],stdout=subprocess.PIPE,encoding="utf-8").stdout
    WORK_DIR=WORK_DIR[0:len(WORK_DIR)-len("autotools")]
    WORK_DIR=WORK_DIR[0:len(WORK_DIR)-1]
    print(WORK_DIR)
    print("本操作将删除所有包目录,慎用,请输入y:")
    if input()=="y":

        pkggroup=["0","2","3","4","5","6","7","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

        for name in pkggroup:
            subprocess.run(["rm","-rf",WORK_DIR+name])
        print("删除完毕")
    else:
        print("输错了，退出")
